                                 Mega Depack
                                 ===========
                         
                               ************** 
                               ***************
                                           ***
                                ************* 
                               *********
                               ***************
                               ***************
                               ***************
                                **************

                                release 2.02
                                ============

                             Coded by Mike Watson
                             ====================

                     This version finished - 28/11/1992
                     ==================================

------------------------------------------------------------------------------

Written in 100% 68000 assembler, who needs compilers to do GEM based programs?
 
------------------------------------------------------------------------------

This program is BEERWARE!, to register you have to buy me a beer. Guiness
would be nice!

------------------------------ the boring bits -------------------------------

This program is FREEWARE and may be distributed on a non profit making
basis by bulletin boards and pd libraries. However it can only go on a 
cover disk of a magazine with my permission, the contact address is at the
end of the text.

I still retain copywrite on my own source and the packer authors to theres.
You may not modify,change or rip off any code without my prior permission
 
Note - this documentation MUST be included with the program file if you do
distribute it.  

------------------------------- the legal bits -------------------------------

This program has been tested as completely as possible and only makes legal
system calls without any 'hacking around' and as such should not cause any
damage. If for any reason damage is caused then I cannot be held for
responsible for it. You use the program at you're own risk. To guard
against any mishaps you should save the depacked files out as a different
name or in a different folder.   

------------------------------ on with the show ------------------------------    

Ok folks, what does it do then?? Well a few months ago I had some programs 
to put on my hard drive and as usual they were packed. While this is no
bad thing in itself, the depacking time does tend to offset the loading
speed off hard drive, so I unpacked them by hacking around in Monst for a 
while. Since this was a regular occurance I decided to code a program which
would automate this process and would be of great help to my self as well.

Anyway I eventually wrote routines to unpack everything I had and was so
pleased with the result that I thought other people would like to use it as
well. So mega depack was released as public domain at the end of april 1992

However development of the program did not stop there though, it went 
through more revisions and at about that time I had two letters from people
who had seen earlier versions and had found stuff it never depacked. Thanks
to Keith Frisby and Rob Gilmour for all their help.

During the development of the program I also started to code a GEM shell
for it. Version 2 is the result of this work.

------------------------------ how to use it ---------------------------------

Anyone who has used the older versions of the programs will be pleased to see
the new GEM interface which is a lot easier to use.

Firstly decide on how you wish to use the program, Mega Depack 2 can run as an
accessory or a program. Rename it as MEGA_DP2.ACC and copy it into the root
directory of your boot disk if you want to run it as an accessory or leave
it as MEGA_DP2.PRG and copy it where you like if you are running it as a 
program. Do not copy it into the auto folder because it uses GEM which is 
not initialised until after the auto folder programs have been run.

To load in a file for unpacking click on the LOAD button. A fileselector will
appear and you can select a file for unpacking. The file will then be loaded
and an attempt will be made to unpack it. If a successful attempt is made then
the SAVE button will be made selectable. Clicking on the save button will 
bring up a file selector where you can select the file to save to. Clicking on
cancel will abort the save process.

A new option for v2 is the batch option. Click on the BATCH button and a file
selector will appear, select the path that the files will be loaded from. A 
new file selector will now appear, this time select the destination path where
the files will be saved to. After this the files will be loaded,depacked and
saved to the destination.

There are some files which cannot be easily recognised and require the user to
decide themselves on how to unpack it.

The clashes are - ice 2.0 and 2.2 have header Ice!.
                  all pompey datafiles have trailer POPI.
                  atom v3.1,3.3 and thunder 1,2 all have header ATOM.

When this occurs you are given a choice of depackers to use or a chance to
exit. Choose what you think is the right depacker. It will more than likely
crash or produce garbage if it is the wrong choice so save it out as a 
different file name and check it. If something is wrong then try again with
another option.

-------------------------------- extra bits ----------------------------------
A new feature of v2 is the ability to recognise several popular file formats.
Some may be packed others may not but mega depack2 will reccommend a package
to view/use/depack the file. 

The current files recognised are LHARC, ARC, ZOO, PK ZIP, IFF, DEGAS unpacked,
NEO pics, NEO animation object files.

If MEGA DEPACK 2 cannot depack a file but suspects that it may have been
packed then please send it to me. If you have written a new packer then I
would also like to receive it.

Ways to spot packed files :-
Mega depack may say that it could be packed.
The file was packed by yourself.
It displays a mesage when loaded e.g 'blah packer v555555 depacking'.
Flashes the colours in a hypnotic fashion.

-------------------------- future enhancements -------------------------------

Future enhancements to this program are :- 

Ensure MULTITOS compatibility.

Ensure FALCON compatibility although it would be nice if the Falcon was 
available in Britain!

Recursive batch mode(this was emntioned on a Genie newsletter).

Use of similer techniques employed by the 'naughty' unpacker to try to 
unpack unknown program types - MAYBE!!
 
--------------------------------- wanted -------------------------------------

1. Back issues of Judge Dredd the Megazine(1,3,7,10,12)
2. Any info on the archiving method used by LHARC 2.01, its so much better
than Atomic. I have located the depacker inside the archiver but havn't been
able to rip it out yet. I want to write an exec packer round this algorithm
as it beats everything!. 
3. Any versions or Sentry packer other than 2.05. And all depack source.

----------------------------- acknowledgements -------------------------------

Steve Delany at Floppyshop - the best pd/shareware library in the uk!
Keith Frisby               - supplier of packers and also the first person
                             to write to me.
Rob Gilmour                - another person to supply packers.
Gordon & Dave              - asteroids - the business.
DML                        - photochrome simply the best iff convertor on 
                             the st.
Gus                        - for liking star trek and for having a strange
                             sense of humour (totally trek tastic matey!).
My cd collection           - for providing musical help in the form of
                             New Order, The Velvet Underground, Sonic Youth
                             (nice to see them getting some recognition at
                              last - they have and always will beat nirvana
                              any day!), Public Enemy, 808 state, The Byrds,
                             The shamen, NIN, The Revolting Cocks , 
                             primal scream and many others no mainstream
                             rubbish here *8}
The authors of all the     - Axe (fire & ice toppled by atomic)
packers.                   - Altair (atomic - 3.5 the business!)
                           - DC software (dcsquish)
                           - Eagle of Sentry (Sentry packer)
                           - The Firehawks (Speed packer) v3 looks great!
                           - JMP (Qpack)
                           - JPM (pompey & thunder)
                           - Mike Coates (bytekiller)
                           - Ozz (automation & lsd)  
                           - Ralph Hartmann (happy - a brave early attempt,
                             birdies med rez fix was possibly the only
                             useful contribution he's ever made to the st!)
                           - Russ Payne (bytekiller)
                           - Thomas Questor/Markus Fritze (pfx packer)
                           - Tim & Andrew Knipe (jam/jek, g'day!)
                           - Tom Hudson (degas)
                           - Trio inc (spectrum 512 - unispec & digispec
                             are superb!)
                           - Vermillion Pawn (!?) (ivory dragon - strange)
                           - any other packer authors I forgot.

----------------------------- packers supported ------------------------------

program/packer    versions    formats
==============  ============  ================================================
4pak                          programs
atomic          3.1/3.3/3.5   programs and datafiles
automation      2.31/2.51     programs and datafiles
automation      5.01          programs and datafiles
ba pack                       programs
bytekiller      2.0/3.0       programs
                Russ Paynes
dcsquish        1.0/1.2/1.4   programs
degas elite                   picture files pc1-3
gollum                        programs(both huffed and not)
happy                         programs
ice             1.1/2.0/2.2   programs and datafiles
                2.3/2.4
ivory dragon                  programs and datadiles
fire            1.0/2.0       programs and datafiles
jam             1/2/3/4       programs and datafiles (lzh,lzw,jam,ice)
jek             1.2/1.3       programs and datafiles
lsd             1.2           programs and datafiles
pfx             1.1/2.1       programs
pompey          1.5/1.9/2.6   programs and datafiles
pompey          1.7/1.9x/2.3  programs          
                3.0        
qpack           2             programs and datafiles
sentry          2.05          programs
spectrum 512                  picture files
speed packer    2/3           programs and datafiles
stos                          programs
superior                      programs
thunder         1             programs 
thunder         2             programs and datafiles 
unknown                       programs (used to pack concerto on STF 37)
vic2                          used by some games companies

                48 packers supported
                81 different file formats

Also recognises a few popular unpacked file formats such as IFF and NEO
object files. 
----------------------------- just for interest ------------------------------

Here's how the files are unpacked (just for the curious).

4pak - uses a modified dissasembly of the depacker. 
atomic progs - modifies program and jumps into it. 
atomic 3.1/3.3 data  - uses routine supplied with program. 
atomic 3.5 data  - uses a dissassembled routine from the packer.
automation 2.3/2.5 program - modifies and runs program.
automation 2.3/2.5 data - uses routine supplied with program.
automation 5.01 program - modifies and runs program.
automation 5.01 program - uses an ICE2.4 depacker.
bapack - modifies and jumps into program
bytekiller - modifies and jumps into program for Russ Paynes version.
             uses a dissassembled routine from the depacker on versions
             2 and 3.
dcsquish 1.0/1.2/1.4 - uses dissassembled code from the depackers.
degas elite - uses a dissassembled routine of unknown origin
gollum - uses a modified dissasembly of the depacker. 
happy - uses a heavily modified dissasembly of the depacker. 
ice progs - all modify and jump into program.
ice data - all use routines supplied with program.
ivory dragon - programs and datafiles use a dissassembled depacker.
fire progs - all modify and jump into program.
fire data - v1 is a dissassembly of unknown origin v2 came with program.
jam - a real mixture of dissassemblies and code that came with program.
      the older ones use the old jek routines. most of the programs modify
      and run the program.
lsd/jek - programs are modified and run. datafiles are depacked using a
          dissassembly of the depacker.
pfx - uses a dissassembly of the depacker.
pompey - programs are modified and run. datafiles use code that came with
         the program.
qpack - uses code supplied with the program.
sentry 2.05 - programs depacked by modifing and running depacker
spectrum 512 - uses a routine a found on a pd disk.
speed packer 2 - programs are modified and run, datafiles use code supplied
               with the program.
speed packer 3 - programs and datafiles use code supplied with the program.
stos - uses a dissassembly of the depacker.
thunder - programs are modified and run. datafiles use code supplied with
          the program
unknown packer - uses a dissassembly of the depacker.

The picture depackers for Spectrum 512 amd Degas elite were included because
some art packages will not accept packed versions of these files. 

----------------------------- history for v2 -------------------------------
version 2 (beta) completed on 29/09/1992.

version 2 release completed on 11/10/1992 

version 2.01 release completed on 23/11/1992. Updated for speed packer 3.	
Nice packer, strange way of saving out files. Its exec files don't have a
depacker. You have to use a supplied prog which locks into the trap 1 vector.
The first line of the packed file is a trap 1 statement and its this that 
triggers off the depacker.

version 2.02 completed on 28/11/1992

------------------------------------------------------------------------------

The full 68000 source (devpac2) is also available for 5.00. It's fully
commented and would be useful if you are learning 68000 as there are no
tricky bits in it. Only calls to the O.S are used. 
 
---------------------------------- address -----------------------------------

If you want to contact me to send packers, programs or anything else you 
think i'd be interested in then my address is -

                            Mike Watson,
                            42 Gilmore Place,
                            Edinburgh,
                            Scotland   

Please include a disk, SAE/IRC's to gaurantee the next version and a 
speedy reply. Please mention the version number as well if you find any
bugs!

Only contact me for legal reasons though.
I really am fed up with people sending me or asking me for cracked s/w. I 
don't have and don't want any, OK!

---------------------------------------------------------------------------
PS - IMPORTANT!!!!!
I am looking for any docs people may have on the FALCON. I intend to switch
to this awesome machine as soon as possible!

I have the basic specs so the kind of things I would be interested in are-

DSP instruction set - I have an assembler for it!
New hardware addresses + any info on them.
New gemdos/bios/xbios calls.  
Whats the score on monitors? It seems that only half the modes can be used
on a standard monitor/tv and the other half only work on VGA. And overscan
doesn't seem to be available at all on VGA. Would a SVGA monitor handle all
the modes or would I have to get a multi-sync.
What IDE standard is the IDE socket? I seem to recall that there is more
than one standard on the PC.

---------------------------------------------------------------------------- 
Mike Watson - 29/11/1992

---------------------------------------------------------------------------
